<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>财务报表列表</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
    <div class="container mt-5">
        <h1>财务报表列表</h1>
        <table class="table">
            <thead>
                <tr>
                    <th>年份</th>
                    <th>总资产</th>
                    <th>总负债</th>
                    <th>股东权益</th>
                    <th>营业收入</th>
                    <th>净利润</th>
                    <th>经营现金流</th>
                    <th>健康指数</th>
                </tr>
            </thead>
            <tbody>
                {% for statement in statements %}
                <tr>
                    <td>{{ statement.year }}</td>
                    <td>{{ statement.total_assets }}</td>
                    <td>{{ statement.total_liabilities }}</td>
                    <td>{{ statement.equity }}</td>
                    <td>{{ statement.revenue }}</td>
                    <td>{{ statement.net_profit }}</td>
                    <td>{{ statement.operating_cash_flow }}</td>
                    <td>
                        {% for health_index in health_indices %}
                            {% if health_index.statement.id == statement.id %}
                                <ul>
                                    <li>盈利能力指数：{{ health_index.profitability_index }}</li>
                                    <li>偿债能力指数：{{ health_index.solvency_index }}</li>
                                    <li>运营效率指数：{{ health_index.efficiency_index }}</li>
                                    <li>整体健康指数：{{ health_index.overall_health_index }}</li>
                                </ul>
                            {% endif %}
                        {% endfor %}
                    </td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</body>
</html>
